#ifndef __UNIT_TYPE_H__
#define __UNIT_TYPE_H__
#include "cocos2d.h"
using namespace cocos2d;

namespace gofgame {
	namespace dungeonkeeper {
		namespace game {
			namespace unit {
				const CCPoint myDirection = ccp(1,0);
				const CCPoint aiDirection = ccp(-1,0);

				struct UnitType {
				public:

					CC_SYNTHESIZE_READONLY(int,id,Id);
					CC_SYNTHESIZE(int,baseHp,BaseHP);
					CC_SYNTHESIZE(int,baseGold,BaseGold);
					CC_SYNTHESIZE(int,baseAtk,BaseAtk);
					CC_SYNTHESIZE(int,baseDef,BaseDef);
					CC_SYNTHESIZE(int,baseSpeed,BaseSpeed);
					CC_SYNTHESIZE(int,baseAttackSpeed,BaseAttackSpeed);
					CC_SYNTHESIZE(float,baseRange,BaseRange);
					CC_SYNTHESIZE(float,alertRange,AlertRange);

					CC_SYNTHESIZE(int,group,Group);
					const char * imageName;
					CCRect boxRect;
					static UnitType createById(int id);
					void initById(int id);
					void updateLv(int lv);
				};
			}
		}
	}
}

#endif //__UNIT_TYPE_H__
